home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form FrmGAME
- Caption = "
- Height = 4425
- Icon = CUP1.FRX:0000
- Left = 1020
- LinkTopic = "Form2"
- ScaleHeight = 268
- ScaleMode = 3 '
- ScaleWidth = 487
- Top = 1140
- Width = 7425
- Begin CommandButton Command2
- Caption = "
- Height = 495
- Left = 5520
- TabIndex = 10
- Top = 3480
- Visible = 0 'False
- Width = 1215
- End
- Begin PictureBox Picture9
- AutoRedraw = -1 'True
- AutoSize = -1 'True
- Height = 750
- Left = 3000
- Picture = CUP1.FRX:0302
- ScaleHeight = 720
- ScaleWidth = 3840
- TabIndex = 9
- Top = 1800
- Visible = 0 'False
- Width = 3870
- End
- Begin PictureBox Picture6
- AutoRedraw = -1 'True
- AutoSize = -1 'True
- Height = 750
- Left = 3000
- Picture = CUP1.FRX:373C
- ScaleHeight = 720
- ScaleWidth = 3840
- TabIndex = 8
- Top = 1770
- Visible = 0 'False
- Width = 3870
- End
- Begin PictureBox Picture5
- AutoRedraw = -1 'True
- AutoSize = -1 'True
- Height = 750
- Left = 3000
- Picture = CUP1.FRX:6B78
- ScaleHeight = 720
- ScaleWidth = 3840
- TabIndex = 7
- Top = 1770
- Visible = 0 'False
- Width = 3870
- End
- Begin PictureBox Picture8
- AutoRedraw = -1 'True
- AutoSize = -1 'True
- Height = 510
- Left = 3000
- Picture = CUP1.FRX:9FB4
- ScaleHeight = 480
- ScaleWidth = 480
- TabIndex = 6
- Top = 1770
- Visible = 0 'False
- Width = 510
- End
- Begin PictureBox Picture7
- AutoRedraw = -1 'True
- AutoSize = -1 'True
- Height = 510
- Left = 3000
- Picture = CUP1.FRX:A7F0
- ScaleHeight = 480
- ScaleWidth = 480
- TabIndex = 5
- Top = 1770
- Visible = 0 'False
- Width = 510
- End
- Begin PictureBox Picture4
- AutoRedraw = -1 'True
- AutoSize = -1 'True
- Height = 3780
- Left = 6960
- Picture = CUP1.FRX:B02C
- ScaleHeight = 3750
- ScaleWidth = 6000
- TabIndex = 4
- Top = 3240
- Visible = 0 'False
- Width = 6030
- End
- Begin CommandButton Command1
- Caption = "
- Height = 495
- Left = 2835
- TabIndex = 3
- Top = 3450
- Width = 1215
- End
- Begin PictureBox Picture3
- AutoRedraw = -1 'True
- AutoSize = -1 'True
- Height = 1950
- Left = 4275
- Picture = CUP1.FRX:23B06
- ScaleHeight = 1920
- ScaleWidth = 960
- TabIndex = 2
- Top = 825
- Visible = 0 'False
- Width = 990
- End
- Begin PictureBox Picture2
- AutoRedraw = -1 'True
- AutoSize = -1 'True
- Height = 1950
- Left = 2925
- Picture = CUP1.FRX:25F40
- ScaleHeight = 1920
- ScaleWidth = 960
- TabIndex = 1
- Top = 810
- Visible = 0 'False
- Width = 990
- End
- Begin PictureBox Picture1
- AutoRedraw = -1 'True
- Height = 3750
- Left = 60
- ScaleHeight = 3720
- ScaleWidth = 6870
- TabIndex = 0
- Top = 105
- Visible = 0 'False
- Width = 6900
- End
- Declare Function bitblt% Lib "GDI" (ByVal hdestdc%, ByVal x%, ByVal y%, ByVal nwidth%, ByVal nheight%, ByVal hsrcdc%, ByVal xsrc%, ByVal ysrc%, ByVal dwrop&)
- Const srccopy = &HCC0020
- Const srcinvert = &H660046
- Const srcand = &H8800C6
- Sub Command1_Click ()
- command1.Visible = False
- mode = 1
- screen.MousePointer = 11
- For i = 1 To 20
- kaiten
- Next i
- screen.MousePointer = 1
- ret = bitblt(hDC, 80, 210, picture9.Width, picture9.Height, picture9.hDC, 0, 0, srccopy)
- End Sub
- Sub Command2_Click ()
- mode = 0
- syoki
- command2.Visible = False
- End Sub
- Sub form_load ()
-
- mypath = CurDir$
-
- 'mypath = "e:\yama\vb_prog\atekko\"
-
- If Right$(mypath, 1) <> "\" Then mypath = mypath + "\"
- 'picture2.picture = LoadPicture(mypath + "cup2.bmp")
- 'picture3.picture = LoadPicture(mypath + "cup2m.bmp")
- 'picture4.picture = LoadPicture(mypath + "haike1.bmp")
- 'picture7.picture = LoadPicture(mypath + "maru1.bmp")
- 'picture8.picture = LoadPicture(mypath + "maru1m.bmp")
- 'picture5.picture = LoadPicture(mypath + "moji1.bmp")
- 'picture6.picture = LoadPicture(mypath + "moji2.bmp")
- 'picture9.picture = LoadPicture(mypath + "moji3.bmp")
- Randomize
- speed = 20
- syoki
- End Sub
- Sub Form_MouseDown (Button As Integer, Shift As Integer, x As Single, y As Single)
- If mode = 1 Then
- For i = 0 To 3
- If Abs(x - cx(i) - 16) < 31 And Abs(y - cy(i) - 32) < 63 Then hantei (i): i = 3
- Next i
- End If
- End Sub
- Sub Form_Paint ()
- If mode = 0 Then
- cy(ball) = 18
- hyouji
- ret = bitblt(hDC, cx(ball) + 16, 130, picture7.Width, picture7.Height, picture8.hDC, 0, 0, srcand)
- ret = bitblt(hDC, cx(ball) + 16, 130, picture7.Width, picture7.Height, picture7.hDC, 0, 0, srcinvert)
- cy(ball) = 50
- End If
- End Sub
- Sub hantei (Index)
- mode = 2
- cy(Index) = 18
- hyouji
- If cup(Index) <> 0 Then
- ret = bitblt(hDC, cx(Index) + 16, 130, picture7.Width, picture7.Height, picture8.hDC, 0, 0, srcand)
- ret = bitblt(hDC, cx(Index) + 16, 130, picture7.Width, picture7.Height, picture7.hDC, 0, 0, srcinvert)
- ret = bitblt(hDC, 80, 210, picture5.Width, picture5.Height, picture5.hDC, 0, 0, srccopy)
- speed = speed + 5
- Else
- ret = bitblt(hDC, 80, 210, picture6.Width, picture6.Height, picture6.hDC, 0, 0, srccopy)
- speed = 20
- End If
- command2.Visible = True
- End Sub
- Sub hyouji ()
- ret = bitblt(picture1.hDC, 25, 20, picture4.Width, picture4.Height, picture4.hDC, 0, 0, srccopy)
- For i = 0 To 3
- ret = bitblt(picture1.hDC, cx(i), cy(i), picture2.Width, picture2.Height, picture3.hDC, 0, 0, srcand)
- ret = bitblt(picture1.hDC, cx(i), cy(i), picture2.Width, picture2.Height, picture2.hDC, 0, 0, srcinvert)
- Next i
- ret = bitblt(hDC, 0, 0, picture1.Width, picture1.Height, picture1.hDC, 0, 0, srccopy)
- End Sub
- Sub kaiten ()
- Dim x1, y1, x2, y2 As Integer
- c1 = Int(Rnd(1) * 4): c2 = (c1 + Int(Rnd(1) * 3 + 1)) And 3
- If c1 > c2 Then temp = c1: c1 = c2: c2 = temp
- x1 = cx(c1)
- x2 = cx(c2)
- y1 = cy(c1)
- y2 = cy(c2)
- sa = Abs(cx(c2) - cx(c1))
- For i = 0 To 100 Step speed
- cx(c1) = x1 + i * sa \ 100: cx(c2) = x2 - i * sa \ 100: a = Sin(i / 100 * 3.14) * 20: cy(c1) = 50 - a: cy(c2) = 50 + a
- hyouji
- Next i
- cx(c1) = c1 * 100 + 50: cx(c2) = c2 * 100 + 50: cy(c1) = 50: cy(c2) = 50
- hyouji
- temp = cup(c1): cup(c1) = cup(c2): cup(c2) = temp
- End Sub
- Sub syoki ()
- Cls
- For i = 0 To 3
- cx(i) = 100 * i + 50
- cy(i) = 50
- cup(i) = 0
- Next i
- ball = Int(Rnd(1) * 4): cup(ball) = 1
- command1.Visible = True
- End Sub
-